package core.conditions;

import server.querry.Condition;
import infrastructure.exceptions.LoginException;
import infrastructure.exceptions.operations.OperationException;
import dal.User;

/**
 * This is a class that should be send to the server and determines that only the pets 
 * delivered by a specific user should be returned
 * @author sashas
 *
 */
public class PetsDeliveredByMe implements Condition{
	
	private static final long serialVersionUID = 8218979510417291732L;
	
	/** keeps user name of the user*/
	private String userName;
	
	/**
	 * @param loggedInUser - user which pets to get 
	 * @throws OperationException - in case user is not a logged in user 
	 */
	public PetsDeliveredByMe(User loggedInUser) throws OperationException{
	
		userName = loggedInUser.getUsername();
	}

	@Override
	public String getQuerry() {
		throw new UnsupportedOperationException("Should never be called at the client");
	}

}
